<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:61:"D:\phpstudy_pro\demo/application/home\view\blogpage\blog.html";i:1613555100;s:68:"D:\phpstudy_pro\demo\application\home\view\blogpage\base\header.html";i:1613304858;s:68:"D:\phpstudy_pro\demo\application\home\view\blogpage\base\footer.html";i:1612008989;}*/ ?>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>

    <!--[if lt IE 8]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->

    <link href="/public/static/home/css/datepicker3.css" rel="stylesheet">
    <link href="/public/static/home/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/public/static/home/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/public/static/home/css/animate.min.css" rel="stylesheet">
    <link href="/public/static/home/css/style.min.css?v=4.0.0" rel="stylesheet">
</head>

<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2>站内动态</h2>
        <ol class="breadcrumb">
            <li>
                <span>主页</span>
            </li>
            <li href="friend">
                站内动态
            </li>
        </ol>
    </div>
    <div class="col-lg-2">
    </div>
</div>
<div class="wrapper wrapper-content">
    <div class="row animated fadeInRight">
        <div class="col-sm-8">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>动态发表</h5>
                </div>
                <div class="ibox-content">
                    <div class="text-center well">
                        <a data-toggle="modal" class="btn btn-primary" id="add">发表动态</a>
                    </div>
                </div>
            </div>
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>最新动态</h5>

                </div>
                <?php if (is_array($blog) || $blog instanceof \think\Collection || $blog instanceof \think\Paginator): $i = 0;
                    $__LIST__ = $blog;
                    if (count($__LIST__) == 0) : echo ""; else: foreach ($__LIST__ as $key => $blog): $mod = ($i % 2);
                        ++$i; ?>
                        <div class="social-feed-box">
                            <div class="social-avatar">
                                <a href="" class="pull-left">
                                    <img alt="image" class="img-circle"
                                         src="http://q1.qlogo.cn/g?b=qq&nk=<?php echo $blog['qq']; ?>&s=160">
                                </a>
                                <div class="media-body">
                                    <a href="../Home/user_data.html?name=<?php echo $blog['name']; ?>">
                                        <?php echo $blog['name']; ?>
                                    </a>
                                    <small class="text-muted text-success"><?php echo $blog['time']; ?></small>
                                </div>
                            </div>
                            <div class="social-body">
                                <p>
                                    <?php echo $blog['info']; ?>
                                </p>

                                <div class="btn-group">
                                    <form action="" method="get" id="form1"></form>
                                    <button class="btn btn-white btn-xs" onclick="zan_blog(<?php echo $blog['Id']; ?>)">
                                        <i class="fa fa-thumbs-up"><?php echo $blog['zan']; ?></i> 赞
                                    </button>
                                    <button class="btn btn-white btn-xs" onclick="show(<?php echo $blog['Id']; ?>)"><i
                                                class="fa fa-comments"></i>评论
                                    </button>
                                    <button class="btn btn-white btn-xs"><i class="fa fa-share"></i> 分享</button>
                                    <?php if ($blog['name'] == $person['name']): ?>
                                        <button class="btn btn-white btn-xs"
                                                onclick="delete_blog(<?php echo $blog['Id']; ?>)"><i
                                                    class="fa fa-times"></i> 删除
                                        </button>
                                    <?php endif; ?>

                                </div>
                            </div>
                            <div class="social-footer">

                                <?php if (is_array($blog['comment']) || $blog['comment'] instanceof \think\Collection || $blog['comment'] instanceof \think\Paginator): $i = 0;
                                    $__LIST__ = $blog['comment'];
                                    if (count($__LIST__) == 0) : echo ""; else: foreach ($__LIST__ as $key => $comment): $mod = ($i % 2);
                                        ++$i; ?>
                                        <div class="social-comment">
                                            <a href="" class="pull-left">
                                                <img alt="image" class="img-circle"
                                                     src="http://q1.qlogo.cn/g?b=qq&nk=<?php echo $comment['qq']; ?>&s=160">
                                            </a>
                                            <div class="media-body">
                                                <a href="#">
                                                    <?php echo $comment['name']; ?>
                                                </a>
                                                <br/>
                                                <?php echo $comment['info'];
                                                if ($comment['name'] == $person['name']): ?>
                                                    <i onclick="delete_comment(<?php echo $comment['Id']; ?>)"
                                                       style="color: red" class="pull-right fa fa-times"></i>
                                                <?php endif; ?>
                                                <br/>
                                                <i class="fa fa-thumbs-up"
                                                   onclick="zan_comment(<?php echo $comment['Id']; ?>)"><?php echo $comment['zan']; ?></i>
                                                <small class="text-muted"><?php echo $comment['time']; ?></small>
                                            </div>
                                        </div>
                                    <?php endforeach; endif; else: echo "";endif; ?>
                                <div class="social-comment" id="text<?php echo $blog['Id']; ?>" hidden>
                                    <a href="" class="pull-left">
                                        <img alt="image" class="img-circle"
                                             src="http://q1.qlogo.cn/g?b=qq&nk=<?php echo $person['qq']; ?>&s=160">
                                    </a>
                                    <div class="media-body">
                                        <textarea class="form-control" placeholder="填写评论..."
                                                  id="comment<?php echo $blog['Id']; ?>" name="info"></textarea>
                                    </div>
                                    <div align="right">
                                        <button type="button" onclick="send_comment(<?php echo $blog['Id']; ?>)"
                                                class="btn btn-primary btn-xs">
                                            <i class="fa fa-check"></i>发表
                                        </button>
                                    </div>
                                </div>

                            </div>

                        </div>
                    <?php endforeach; endif; else: echo "";endif; ?>
                <div class="text-center">
                    <?php echo $page; ?>
                </div>
            </div>

        </div>
    </div>
</div>

<script type="text/javascript">
    var BASE_URL = '/public/static/home/js/plugins/webuploader';
</script>
<script src="/public/static/home/js/jquery.min.js?v=2.1.4"></script>
<script src="/public/static/home/js/bootstrap.min.js?v=3.3.5"></script>
<script src="/public/static/home/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/public/static/home/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/public/static/home/js/plugins/layer/layer.min.js"></script>
<script src="/public/static/home/js/hplus.min.js?v=4.0.0"></script>
<script type="text/javascript" src="/public/static/home/js/contabs.min.js"></script>
<script src="/public/static/home/js/plugins/pace/pace.min.js"></script>
<script src="/public/static/home/js/layui/layui.all.js"></script>
<script src="/public/static/home/js/demo/blog.js"></script>
